Print even and odd numbers in java